home *** CD-ROM | disk | FTP | other *** search
- This soundtracker player has some very interesting features, probably unique.
- - it's written entirely in C.
- - it's portable.
- - it goes through the OS for everything (except the audio filter toggling,
- but that's not provided for right now).
- - it reads archive files (like lha or zoo).
-
- Right now, it uses the timer WAIT_EBLANK unit for all its timings and assumes
- everything is done fast enough that the new audio commands will fall on the
- right beat. Since nothing is buffered, it might not work quite as intended
- if you switch `verbose' mode on (you need at least an accelerated amiga and
- probably a two-color screen for it to work... there's a good reason I turn
- off the cursor), but I had no time to do better.
- One amusing feature: since it waits for the system time to reach a certain
- value, it you pause tracker (by hitting the space bar or locking the console
- by another mean), it will speed up afterwards until it catches up with lost
- time.
-
- Ideally I intend to implement a two-tasks model: task 1
- will fill messages telling what to do at a given time until it has no messages
- left, and send them to task 2.
- task 2 will peek at the messages it received, wait for the next thing to do,
- do it, and send the message back to task 1.
-
- This has got lots of advantages.
- - put everything that is time-critical in one very simple routine that
- basically only has to wait for the right time and send very simple events
- to the audio device. You can up the priority of this task to 127 if need be
- since it waits most of the time.
- - tracker modules do not always need the same amount of processing power,
- the load might even vary (and does vary) during one given module. Using
- buffering means you equalize the load and you can then play very complex
- modules on a small amiga even with unoptimized code.
-
- One stupid problem I got in while programming the amiga_support was using
- the standard WAIT unit of the timer.device, the one based on VBLANK.
- This was very stupid: using a timer unit of the same resolution (or about so)
- as the events I was wanting to measure. Since I got unlucky, it appeared to
- work correctly for quite some time... I'm usually looking at a rock-solid
- NTSC 60Hz display.
-
- The other small thing to do would be to use feedback in the timer.device
- handling: since ReadEClock() is a very low cost call, I can use it to check
- what time it actually is when my task awakens and adjust the next interval
- to get back that small delay dynamically, according to the load of my machine.
-